package com.atguigu.day06.Arrays;

public class ArrayTest1 {

    public static void main(String[] args) {
        //5.数组元素默认初始化
        int[] arr = new int[4];
        for (int i = 0; i <= arr.length - 1; i++) {
            System.out.println("数组int元素默认值是"+arr[i]);
        }

        System.out.println("==========================");

        short[] arr1 = new short[4];
        for (int i = 0; i <= arr1.length - 1; i++) {
            System.out.println("数组short元素默认值是"+arr1[i]);
        }

        System.out.println("==========================");

        float[] arr2 = new float[4];
        for (int i = 0; i <= arr2.length - 1; i++) {
            System.out.println("数组float元素默认值是"+arr2[i]);
        }

        System.out.println("==========================");

        char[] arr3 = new char[4];
        for (int i = 0; i <= arr3.length - 1; i++) {
            System.out.println("数组char元素默认值是"+arr3[i]+"***");
        }
        if(arr3[0] == 0){
            System.out.println("你好");
        }

        System.out.println("==========================");

        boolean[] arr4 = new boolean[4];
        for (int i = 0; i <= arr4.length - 1; i++) {
            System.out.println("数组boolean元素默认值是"+arr4[i]);
        }

        System.out.println("==========================");

        String[] arr5 = new String[4];
        for (int i = 0; i <= arr5.length - 1; i++) {
            System.out.println("数组引用类型元素默认值是"+arr5[i]);
        }
    }
}
